package com.cy.pj.service.impl;

import com.cy.pj.dao.ItemDao;
import com.cy.pj.pojo.Item;
import com.cy.pj.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ItemServiceImpl implements ItemService {
    @Autowired
    private ItemDao itemDao;
    @Override
    public List<Item> itemService(Item item) {
        List<Item> list=itemDao.selectItem(item);
        return list;
    }

    @Override
    public int insertService(Item item) {
        int insert = itemDao.insertItem(item);
        return insert;
    }

    @Override
    public int deleteById(Integer...id) {
        int delete = itemDao.deleteById(id);
        return delete;
    }

    @Override
    public Item findById(Integer id) {
        Item byId = itemDao.findById(id);
        return byId;
    }

    @Override
    public int updatedServer(Item item) {
        return 0;
    }
}
